package com.maiyawx.mall.exception;

import com.alibaba.fastjson.JSONObject;
import com.maiyawx.mall.enums.CommonEnum;

public class WxException extends RuntimeException {

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public WxException(JSONObject data)
    {
        super(data.getString("errmsg"));
        this.code = CommonEnum.WX_ERROR.getCode();
    }

}
